package com.yoga.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * yoga_transaction
 * @author 
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class YogaTransaction implements Serializable {
    private Integer trid;

    private String uid;

    private Date ttime;

    private String ttype;

    private String inOut;

    private BigDecimal tmoney;

    private String tlog;

    private String uuid;

    private static final long serialVersionUID = 1L;

    public Integer getTrid() {
        return trid;
    }

    public void setTrid(Integer trid) {
        this.trid = trid;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public Date getTtime() {
        return ttime;
    }

    public void setTtime(Date ttime) {
        this.ttime = ttime;
    }

    public String getTtype() {
        return ttype;
    }

    public void setTtype(String ttype) {
        this.ttype = ttype;
    }

    public String getInOut() {
        return inOut;
    }

    public void setInOut(String inOut) {
        this.inOut = inOut;
    }

    public BigDecimal getTmoney() {
        return tmoney;
    }

    public void setTmoney(BigDecimal tmoney) {
        this.tmoney = tmoney;
    }

    public String getTlog() {
        return tlog;
    }

    public void setTlog(String tlog) {
        this.tlog = tlog;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        YogaTransaction other = (YogaTransaction) that;
        return (this.getTrid() == null ? other.getTrid() == null : this.getTrid().equals(other.getTrid()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getTtime() == null ? other.getTtime() == null : this.getTtime().equals(other.getTtime()))
            && (this.getTtype() == null ? other.getTtype() == null : this.getTtype().equals(other.getTtype()))
            && (this.getInOut() == null ? other.getInOut() == null : this.getInOut().equals(other.getInOut()))
            && (this.getTmoney() == null ? other.getTmoney() == null : this.getTmoney().equals(other.getTmoney()))
            && (this.getTlog() == null ? other.getTlog() == null : this.getTlog().equals(other.getTlog()))
            && (this.getUuid() == null ? other.getUuid() == null : this.getUuid().equals(other.getUuid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTrid() == null) ? 0 : getTrid().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getTtime() == null) ? 0 : getTtime().hashCode());
        result = prime * result + ((getTtype() == null) ? 0 : getTtype().hashCode());
        result = prime * result + ((getInOut() == null) ? 0 : getInOut().hashCode());
        result = prime * result + ((getTmoney() == null) ? 0 : getTmoney().hashCode());
        result = prime * result + ((getTlog() == null) ? 0 : getTlog().hashCode());
        result = prime * result + ((getUuid() == null) ? 0 : getUuid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", trid=").append(trid);
        sb.append(", uid=").append(uid);
        sb.append(", ttime=").append(ttime);
        sb.append(", ttype=").append(ttype);
        sb.append(", inOut=").append(inOut);
        sb.append(", tmoney=").append(tmoney);
        sb.append(", tlog=").append(tlog);
        sb.append(", uuid=").append(uuid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}